<?php
    $this->load->view('admin/support_nav');
    echo form_open('', array('id' => 'support_form'), array('support_id' => 0, 'from_list' => TRUE));
    echo isset ($uri) ? form_hidden('uri', $uri) : NULL;
    echo isset ($back_url) ? form_hidden('back_url', $back_url) : NULL;
    echo form_close();
?>
<div class="form_content">
    <div class="filter" style="margin-top: 5px;"><?php echo $language_combobox;?></div>
    <div id="sort_support" class="support_sort" style="margin-bottom: 10px;">
        <ul>
            <li class="header">
                <div class="fleft">TÀI KHOẢN HỖ TRỢ</div>
                <div class="fright">CHỨC NĂNG</div>
                <br class="clear"/>
            </li>
        <?php
            foreach ($supports as $i => $support)
            {
                $content = '';
                if($support->type == YAHOO)
                {
                    $content =
                    '<a rel="nofollow" href="ymsgr:sendIM?' . $support->content . '">
                        <img align="absmiddle" vspace="2" hspace="2" border="0" alt="" src="http://opi.yahoo.com/online?u=' . $support->content . '">&nbsp;' . $support->title .
                    '</a>';
                }
                else if($support->type == SKYPE)
                {
                    $content =
                    '<a href="skype:' . $support->content . '?call">
                        <img src="http://mystatus.skype.com/smallicon/' . $support->content .'" style="border: none;" alt="My status" />&nbsp;' . $support->title .
                    '</a>';
                }
                else if($support->type == TELEPHONE)
                {
                    $content =
                    '<a href="#">
                        <img src="/powercms/images/con_tel.png" style="border: none;" alt="Telephone" />&nbsp;' . $support->content .
                    '</a>';
                }
                else if($support->type == TEXT)
                {
                    $content = $support->content;
                }

                $functions = '<a class="edit" href="javascript:void(0);" onclick="submit_support(' . $support->id . ', \'edit\');" title="Sửa hỗ trợ này"/><em>&nbsp;</em></a>';
                $functions .= '<a class="del" href="javascript:void(0);" onclick="submit_support(' . $support->id . ', \'delete\');" title="Xóa hỗ trợ này"/><em>&nbsp;</em></a>';

                echo <<< eob
                <li id="id_{$support->id}">
                    {$content}
                    <div class="fright" >{$functions}</div>
                </li>
eob;
            }
        ?>
            <span style="text-align: center;"></span>
        </ul>
    </div>
</div>
